package cn.com.elite;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class test {
	public static void main(String[] args){
		DataBaseConnection dc=new DataBaseConnection();
		try {
			Statement stmt=dc.getConnection().createStatement();
			ResultSet rs=stmt.executeQuery(" select * from staff ");
			while (rs.next()){
				String title = rs.getString("id");  
			    String name = rs.getString("name");  
			    System.out.println(title+" "+name);  
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
